Introduction - 02

OPENING QUESTIONS:  

1) Why did my college Computer Science professor call computers "High speed idiots?"

OBJECTIVE:   I will be able to construct algorithms for performing simple tasks after today's class.

WORDS O' THE DAY:

  • algorithm ("")
  • computer ("a high speed idiot")
  • computer science ("")
  • program ("")
  • programming language ("")

WORK O' THE DAY

Let's take a look at those opening vocab terms... take a few moments to work individually to define today's vocab words.

Then work with your group to combine/edit/expand/create a group definition for each term. You MUST reach consensus on each.

Now let's discuss and make a CLASS definition for each:

═════════════════════════

ALGORITHMS

So... hopefully we've arrived at a reasonable definition of those terms.

Now we're going to focus in on the term 'algorithm'. Keep in mind that an algorithm is simply a process, a method for of doing something and is NOT the same as a computer program (they are often confused). In fact, please take a moment to CONTRAST (suggest explanations of how they are different):

computer program AND algorithm

═════════════════════════

Now let's put those ideas to work.

Working with your group, grab a piece of paper and VERY specifically write an algorithm (a series of steps) to fully construct a jelly and butter sandwich (be careful)

═════════════════════════

Now we'll (randomly) select someone to present their group's algorithm to Mr W who will VERY SPECIFICALLY follow those instructions.

We'll try another person or two

Now go back and de-bug your algorithm.... what did you over look? What additional detail do you need to provide in order to adequately make our 'computer' successfully complete that task.

═════════════════════════

Notice that computers really are high speed idiots-- that is, a computer will do EXACTLY what you tell it to, regardless of the consequences.

If you instruct a computer to start counting until it reaches a 'big' number, the computer will keep counting forever (or until you stop the program or turn off the computer) because it has no idea whatsoever what "big" means.

═════════════════════════

The process of analyzing what the computer is ACTUALLY doing compared to what you WANT it to do is called 'debugging'.

<Mr W Side Topic: There are some interesting conversations around the internet and in academia as to where the term 'debugging' came from:

Some people say that 50 or 60 years or so ago when instructions were 'fed' into computers using punch cards, that a moth flew into a batch of punch cards and caused problems (hence the term 'bug')

Other people say the term 'bug' has been around in engineering since at least the end of 19th century and was commonly used to describe a problem with some mechanical process that wasn't working correctly.

═════════════════════════

TAKEAWAYS:

Before we can write instructions to a computer (usually called 'writing code') we have to make sure we have mapped out a specific series of steps to accomplish that task. Those series of steps are called an algorithm.

As we saw in our demonstration today, if our algorithm has too much un-necessary detail or too little detail, our program will fail. When our program fails to perform as expected, we have to 'debug' our work to find out how our instructions to the computer are failing.

HOMEWORK (as needed):

CLOSING TASK: